package com.luckmgr.service.impl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.common.service.BaseService;
import com.luckmgr.dao.LevelPrizeMapper;
import com.luckmgr.entity.db.LevelPrize;
import com.luckmgr.entity.db.Prize;
import com.luckmgr.entity.db.SunPrize;
import com.luckmgr.service.LevelPrizeService;


@Service
public class LevelPrizeServiceImpl extends BaseService<LevelPrize> implements LevelPrizeService {
	
	
	LevelPrizeMapper levelPrizeMapper;
	
	@Resource(name="levelPrizeMapper")
    public void initCompanyMapper(LevelPrizeMapper levelPrizeMapper) {
		this.levelPrizeMapper = levelPrizeMapper;
        super.setBaseDao(levelPrizeMapper);
    }
	@Override
	public void updatePrizeName(Prize prize) {
		// TODO Auto-generated method stub
		levelPrizeMapper.updatePrizeName(prize.getId(),prize.getPrizeName());;
	}
	@Override
	public void deleteByPrizeid(Integer pid) {
		levelPrizeMapper.deleteByPrizeid(pid);
	}
	@Override
	public  List<SunPrize> selectSunByAid(Integer aid) {
		return levelPrizeMapper.selectSunByAid(aid);
		
	}
	
	
}